package xx.thread.base;

public class ThreadStart extends Thread {

    private String name;

    public ThreadStart(String name) {
        this.name = name;
    }

    @Override
    public void run() {
        for (int i = 0; i < 10; i++) {
            System.out.println(name + "运行：" + i);
        }
    }

    public static void main(String[] args) {
        ThreadStart t1 = new ThreadStart("A");
        ThreadStart t2 = new ThreadStart("B");

        t1.start();
        t2.start();
    }
}
